package model;

/**
 * This Class is a SubscriptionRequest Model which Saves Subscription Request Details for Customer .
 * @author Tal
 *
 */

public class SubscriptionRequestModel 
{		
		
		/** The uid. */
		private int uid;
		
		/** The gid. */
		private int gid;
		
		/** The pid. */
		private int pid;
		
		/** The credit n. */
		private long creditN;
		
		/** The ccv. */
		private int ccv;
		
		/** The expire. */
		private String expire;	
		
		/** The type. */
		private String type;
		
		/** The Location. */
		private int Location;

		
		
		/**
		 * Instantiates a new subscription request model.
		 */
		public SubscriptionRequestModel()
		{
	       
			this.uid=0;
			this.gid=0;
			this.pid=0;
			this.creditN=0;
			this.ccv=0;
			this.expire="";	
			this.type="";
		
		}
			
		
		
	
		/**
		 * Instantiates a new subscription request model.
		 *
		 * @param uid the uid
		 * @param gid the gid
		 * @param pid the pid
		 * @param creditN the credit n
		 * @param ccv the ccv
		 * @param expire the expire
		 * @param type the type
		 */
		public SubscriptionRequestModel(int uid, int gid,int pid, long creditN, int ccv, String expire,String type)
		{
			this();
			this.uid=uid;
			this.gid=gid;
			this.pid=pid;
			this.creditN=creditN;
			this.ccv=ccv;
			this.expire=expire;
			this.type=type;
		
		}
		
		
		/**
		 * This method returns customer id .
		 * @return int uid.
		 */
			public int getUID() {
				return this.uid;
			}

		/**
		 * This method sets new customer id to customer .
		 *
		 * @param cusID the new uid
		 */
			public void setUID(int cusID) {
				this.uid = cusID;
			}


		/**
		 * This method returns Group ID.
		 * @return int gid.
		 */
			public int getGID() {
				return this.gid;
			}

		/**
		 * This method sets new group id .
		 *
		 * @param groupID the new gid
		 */
			public void setGID(int groupID) {
				this.gid = groupID;
			}
			
		
				/**
				 * Gets the pid.
				 *
				 * @return the pid
				 */
				public int getPID() {
					return this.pid;
				}

				/**
				 * Sets the pid.
				 *
				 * @param pID the new pid
				 */
				public void setPID(int pID) {
					this.pid = pID;
				}

				
		/**
		 * This method returns Credit Number.
		 * @return long creditN.
		 */
			public long getCreditN() {
				return this.creditN;
			}

		/**
		 * This method sets new Credit Number.
		 * @param creditNum - new credit number.
		 */
			public void setCreditN(long creditNum) {
				this.creditN = creditNum;
			}
					
		/**
		  * This method returns CCV.
		  * @return int ccv.
		 */
			public int getCCV() {
				return  this.ccv; 
			}
			
		
		/**
		  * This method sets new ccv.
		  * @param CCV - new ccv .
		  */
	    	public void setCCV(int CCV) {
			this.ccv = CCV;
		    }
	    	

			/**
			  * This method returns subscribe expiration .
			  * @return String expire.
			 */
			
			public String getExpire() {
				return this.expire; 
			}
			
			/**
			 * This method get String status .
			 *
			 * @param Expire - new expire
			 */
	    	
	    	public void setExpire(String Expire)
	    	{
	    		this.expire=Expire;
	    	}
	    	
	    	
			
			/**
			 * Gets the type.
			 *
			 * @return the type
			 */
			public String getType() {
				return this.type; 
			}
			
		
	    	
	    	/**
	    	 * Sets the type.
	    	 *
	    	 * @param type the new type
	    	 */
	    	public void setType(String type)
	    	{
	    		this.type=type;
	    	}
	    	
	    	
	    
			/**
			 * Gets the location.
			 *
			 * @return the location
			 */
			public int getLocation() {
				return this.Location; 
			}
			
		
	    	
	    	
	    	/**
	    	 * Sets the location.
	    	 *
	    	 * @param loc the new location
	    	 */
	    	public void setLocation(int loc)
	    	{
	    		this.Location=loc;
	    	}
	    	
	    	/**
	    	 * This method returns ServiceId by Name .
	    	 *
	    	 * @param gid the gid
	    	 * @return String ServiceName.
	    	 */
			
			public String getServiceByName(int gid) {
				String ServiceName=null;
				  switch (gid) {
		            case 2:  ServiceName = "Photo Package";
		                     break;
		            case 5:  ServiceName = "Daily Photo";
		                     break;
		            case 6:  ServiceName = "Business Layer";
		                     break;
		            case 7:  ServiceName = "Infrastructure Layer";
		                     break;         
		            default: ServiceName = "Invalid Service";
		                     break;
		        }
				  
				  return ServiceName;
				  
			}
	    	
	    	/**
	    	 * This method toString-all vars of class.
	    	 *
	    	 * @return the string
	    	 */
	    	
	    	public String toString(){
	    		return "Uid:  "+ getUID() + "\nServiceID:  " + getGID() +"\nService:  "+getServiceByName(getGID())   + "\nCredit Number:  " + getCreditN() + "\nCCV: " + getCCV() + "\nExpiration:  " + getExpire()+"\nCredit Card Type:   "+getType();
	    	}


}
